// **************** wheelTest.c *********************

#include "inc/hw_types.h"
#include "adc.h"
#include "os.h"
#include "lm3s8962.h"
#include "ports.h"
#include "wheel.h"


#define WHEELTEST_DEBUG 1
#define TIMESLICE 2*TIME_1MS  // thread switch time in system time units
#define PERIOD TIME_1MS/2     // 2kHz sampling period in system time units

// ***********************************************************************
// *****************   GLOBALS   ***************************************
// *******************************************************************
unsigned long NumCreated;   // number of foreground threads created
unsigned long Count1 = 0;

#if WHEELTEST_DEBUG
unsigned short WheelData;
#endif
// ********************************************************************
// **********************************************************************

void Thread1(void){
  while(1){  
    WheelData = Wheel_Speed();
  }
}

int main(void){
  OS_Init();
  Wheel_Init();
  //Ports_Init_DigOut();
  NumCreated += OS_AddThread(&Thread1,128,1);
  OS_Launch(TIMESLICE);
  return 0;
}